package org.tis.tools.abf.module.om.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import org.tis.tools.abf.module.ac.entity.AcApp;
import org.tis.tools.abf.module.om.entity.OmEmployee;
import org.tis.tools.abf.module.om.entity.OmGroup;
import org.tis.tools.abf.module.om.entity.enums.OmEmployeeStatus;
import org.tis.tools.abf.module.om.entity.enums.OmGender;

import java.math.BigDecimal;
import java.util.List;

/**
 * omGroup的Mapper类
 * 
 * @author Auto Generate Tools
 * @date 2018/04/23
 */
public interface OmGroupMapper extends BaseMapper<OmGroup>  {


    List<OmEmployee> selectOrgEmpNotInGroup(@Param("guidOrg") String guidOrg,@Param("groupCode") String groupCode);

    List<AcApp> selectAppNotInGroup(String groudCode);

    String selectPositionName(@Param("positionGuid") String positionGuid);

    Integer selectEmpNumByPosition(@Param("positionGuid") String positionGuid);

    List<OmEmployee> selectEmployee(Pagination page,@Param("groupId") String groupId);

    List<OmEmployee> selectEmployeeFilter(Pagination page, @Param("groupId") String groupId, @Param("empCode") String empCode, @Param("empName") String empName, @Param("gender") OmGender gender, @Param("guidPosition") String guidPosition, @Param("guidEmpMajor") String guidEmpMajor, @Param("empstatus") OmEmployeeStatus empstatus);

    List<OmEmployee> selectEmpByGroup(@Param("groupId") String groupId);

    List<OmEmployee> selectEmpByPosition(@Param("positionGuid") String positionGuid);

    void reorderOrg(@Param("targetGuid")String identityGuid, @Param("index") BigDecimal index, @Param("flag") String
            flag);

    void reorderOrgNoParentId(@Param("index") BigDecimal index, @Param("flag") String flag);
}

